package com.encryption.rpc.model;

public class LoginErrorInfo {
	
	private boolean hasLock = false;
	private int lostErrorTime = 0;
	private String errorMessage;
	
	public LoginErrorInfo(boolean hasLock, int lostErrorTime,
			String errorMessage) {
		super();
		this.hasLock = hasLock;
		this.lostErrorTime = lostErrorTime;
		this.errorMessage = errorMessage;
	}
	
	public boolean isHasLock() {
		return hasLock;
	}
	public void setHasLock(boolean hasLock) {
		this.hasLock = hasLock;
	}
	public int getLostErrorTime() {
		return lostErrorTime;
	}
	public void setLostErrorTime(int lostErrorTime) {
		this.lostErrorTime = lostErrorTime;
	}
	public String getErrorMessage() {
		return errorMessage;
	}
	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}
	
	public static LoginErrorInfo createLockObject(){
		return new LoginErrorInfo(true, 0, "密码错误次数过多，请15分钟后登录");
	}
	
	public static LoginErrorInfo createErrorTimeObject(int lostErrorTime){
		return new LoginErrorInfo(false, lostErrorTime, "登陆失败，您还可以尝试"+ lostErrorTime +"次");
	}
	
}
